package com.jsb.laundry.model.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 用于订单下单时接收参数
 *
 * @author zmy
 * @create 2023-02-22 21:26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(description = "用于订单下单时接收参数")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class OrderInfoDto implements Serializable {
    private static final long serialVersionUID = 115L;

    @ApiModelProperty("支付id")
    private String payId;

    @ApiModelProperty("用户id")
    private String userId;

    @ApiModelProperty("优惠券id")
    private String couponId;

    @ApiModelProperty("月卡id")
    private String monthCardId;

    @ApiModelProperty("使用的卡券id")
    private String cardId;

    @ApiModelProperty("上门取衣地址")
    private String userAddressIdCome;

    @ApiModelProperty("衣物送回地址")
    private String userAddressIdBack;

    @ApiModelProperty("用户预约上门时间")
    private Date appointmentTime;

    @ApiModelProperty("选购的商品信息列表")
    private List<Detail> orderInfoList;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Accessors(chain = true)
    @ApiModel(description = "购买的商品信息")
    public static class Detail {
        @ApiModelProperty("商品id")
        private String goodsId;
        @ApiModelProperty("服务id")
        private String serveId;
        @ApiModelProperty("购买量")
        private int buyNum;
    }

    /**
     *  要补差价的支付订单支付单号
     */
    private List waitPayIdList;

    /**
     * 支付token防止订单重复提交
     */
    private String payToken;
}